Problem: In $\triangle ABC$, the sides have integer lengths and $AB=AC$. Circle $\omega$ has its center at the incenter of $\triangle ABC$. An excircle of $\triangle ABC$ is a circle in the exterior of $\triangle ABC$ that is tangent to one side of the triangle and tangent to the extensions of the other two sides. Suppose that the excircle tangent to $\overline{BC}$ is internally tangent to $\omega$, and the other two excircles are both externally tangent to $\omega$. Find the minimum possible value of the perimeter of $\triangle ABC$.

Explanation: Let the tangent circle be $\omega$. Some notation first: let $BC=a$, $AB=b$, $s$ be the semiperimeter, $\theta=\angle ABC$, and $r$ be the inradius. Intuition tells us that the radius of $\omega$ is $r+\frac{2rs}{s-a}$ (using the exradius formula). However, the sum of the radius of $\omega$ and $\frac{rs}{s-b}$ is equivalent to the distance between the incenter and the the $B/C$ excenter. Denote the B excenter as $I_B$ and the incenter as $I$. Lemma: $I_BI=\frac{2b*IB}{a}$ We draw the circumcircle of $\triangle ABC$. Let the angle bisector of $\angle ABC$ hit the circumcircle at a second point $M$. By the incenter-excenter lemma, $AM=CM=IM$. Let this distance be $\alpha$. Ptolemy's theorem on $ABCM$ gives us\[a\alpha+b\alpha=b(\alpha+IB)\to \alpha=\frac{b*IB}{a}\]Again, by the incenter-excenter lemma, $II_B=2IM$ so $II_b=\frac{2b*IB}{a}$ as desired. Using this gives us the following equation:\[\frac{2b*IB}{a}=r+\frac{2rs}{s-a}+\frac{rs}{s-b}\]Motivated by the $s-a$ and $s-b$, we make the following substitution: $x=s-a, y=s-b$ This changes things quite a bit. Here's what we can get from it:\[a=2y, b=x+y, s=x+2y\]It is known (easily proved with Heron's and a=rs) that\[r=\sqrt{\frac{(s-a)(s-b)(s-b)}{s}}=\sqrt{\frac{xy^2}{x+2y}}\]Using this, we can also find $IB$: let the midpoint of $BC$ be $N$. Using Pythagorean's Theorem on $\triangle INB$,\[IB^2=r^2+(\frac{a}{2})^2=\frac{xy^2}{x+2y}+y^2=\frac{2xy^2+2y^3}{x+2y}=\frac{2y^2(x+y)}{x+2y}\]We now look at the RHS of the main equation:\[r+\frac{2rs}{s-a}+\frac{rs}{s-b}=r(1+\frac{2(x+2y)}{x}+\frac{x+2y}{y})=r(\frac{x^2+5xy+4y^2}{xy})=\frac{r(x+4y)(x+y)}{xy}=\frac{2(x+y)IB}{2y}\]Cancelling some terms, we have\[\frac{r(x+4y)}{x}=IB\]Squaring,\[\frac{2y^2(x+y)}{x+2y}=\frac{(x+4y)^2*xy^2}{x^2(x+2y)}\to \frac{(x+4y)^2}{x}=2(x+y)\]Expanding and moving terms around gives\[(x-8y)(x+2y)=0\to x=8y\]Reverse substituting,\[s-a=8s-8b\to b=\frac{9}{2}a\]Clearly the smallest solution is $a=2$ and $b=9$, so our answer is $2+9+9=\boxed{20}$.